package com.xdf.ecommerce.feign;

import com.xdf.ecommerce.goods.GoodsInfo;
import com.xdf.ecommerce.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 在 e-commerce-mvc-config 中制作了使用统一响应对象
 * 通过 feign 接受到的响应结果都是通过 CommonResponse 包装之后的
 * 除非使用了注解 IgnoreResponseAdvice 忽略返回结果时包装
 * @author chanchaw
 * @create 2025-11-11 22:11
 */
@FeignClient(contextId = "NotSecuredGoodsClient", value = "e-commerce-goods-service")
public interface NotSecuredGoodsClient {
    @PostMapping("/ecommerce-goods-service/asyncGoods/test")
    CommonResponse<LocalDateTime> test();
    @PostMapping("/ecommerce-goods-service/goods/getGoodsInfo8Id")
    CommonResponse<List<GoodsInfo>> getGoodsInfo8Id(@RequestBody List<Long> ids);
}
